package com.zw.admin.server.dao;

import com.zw.admin.server.commom.TkMapper;
import com.zw.admin.server.model.UserSpace;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface UserSpaceDao extends TkMapper<UserSpace> {


    @Select("select count(1) from user_space where user_id = ${userId} and space_id = ${spaceId}")
    String list(Long userId,String spaceId);

    @Delete("delete from user_space where space_id = #{space_id}")
    int deleteUserSpace(Long space_id);

}
